const createOption = (data, i) => ({
  color: ['#67F9D8', '#FFE434', '#56A3F1', '#FF917C'],
  radar: [{
      indicator: [{
          text: '科技成果转化',
          max: 30
        },
        {
          text: '知识产权',
          max: 30
        },
        {
          text: '研发组织管理',
          max: 30
        },
        {
          text: '企业成长性',
          max: 30
        }
      ],
      center: ['50%', '50%'],
      radius: 85,
      startAngle: 75,
      splitNumber: 4,
      shape: 'circle',
      nameGap: 20,
      axisName: {
        formatter: function (value, indicator) {
          i++;
          return [`{a|${value}}`, `{b|${data[i]}(分)}`].join('\n');
        },
        rich: {
          a: {
            fontSize: 13,
            lineHeight: 25,
            color: '#333',
            fontWeight: 'bold'
          },
          b: {
            color: '#999',
            align: 'center'
          }
        }
      },
      axisLine: {
        lineStyle: {
          color: '#EAEBED'
        }
      },
      splitArea: {
        show: false
      },
      splitLine: {
        lineStyle: {
          type: [3],
          color: '#999'
        }
      }
    },
    {
      indicator: [{}],
      splitNumber: 1,
      center: ['50%', '50%'],
      radius: 85,
      axisLine: {
        show: false
      },
      shape: 'circle',
      splitLine: {
        lineStyle: {
          width: 5,
          type: 'solid',
          color: '#698FF6'
        }
      }
    }
  ],
  series: [{
    type: 'radar',
    symbol: 'none',
    areaStyle: {
      color: {
        type: 'linear',
        x: 0,
        y: 0,
        x2: 0,
        y2: 1,
        colorStops: [{
            offset: 0,
            color: '#3D72FF' // 0% 处的颜色
          },
          {
            offset: 1,
            color: '#AEC4FF' // 100% 处的颜色
          }
        ],
        global: false // 缺省为 false
      }
    },
    lineStyle: {
      width: 0
    },
    data: [{
      value: data,
      name: 'Data A',
      areaStyle: {
        opacity: 1
      }
    }]
  }]
});
export default createOption;